package com.golang.activity.controller;

import com.golang.activity.dto.request.ActivityBasicDto;
import com.golang.activity.dto.request.ActivitySearchDto;
import com.golang.activity.dto.request.ActivitySettingDto;
import com.golang.activity.dto.response.ActivityBasicRespDto;
import com.golang.activity.dto.response.ActivityDetailDto;
import com.golang.activity.dto.response.ActivityListRespDto;
import com.golang.activity.dto.response.ActivitySettingRespDto;
import com.golang.activity.service.ActivityService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;


@RestController
@RequestMapping("/api/activity")
@Slf4j
public class ActivityController {

    @Resource
    ActivityService activityService;

    //创建基本信息
    @PostMapping(value = "/basic")
    public String createBasic(@RequestBody ActivityBasicDto basic) {
        return activityService.createBasic(basic);
    }


    //编辑基本信息
    @PutMapping(value = "/basic")
    public Boolean updateBasic(@RequestBody ActivityBasicDto basic) {
        return activityService.updateBasic(basic);
    }


    //创建/修改报名设置信息
    @PostMapping(value = "/createSetting")
    public Boolean createSetting(@RequestBody ActivitySettingDto setting) {
        return activityService.createSetting(setting);
    }


    //获取基本信息
    @PostMapping(value = "/getBasic")
    public ActivityBasicRespDto getBasic(@RequestParam String activityId) {
        return activityService.getBasic(activityId);
    }


    //获取报名设置信息
    @PostMapping(value = "/getSetting")
    public ActivitySettingRespDto getSetting(@RequestParam String activityId) {
        return activityService.getSetting(activityId);
    }


    //一键复制
    @PostMapping(value = "/copyHistory")
    public Boolean copyHistory(@RequestParam String activityId) {
        return activityService.copyHistory(activityId);
    }


    //活动详情页
    @PostMapping(value = "/info")
    public ActivityDetailDto info(@RequestParam String activityId) {
        return null;
    }


    //活动列表(首页搜索)
    @PostMapping(value = "/list")
    public ActivityListRespDto list(@RequestBody ActivitySearchDto dto) {
        return null;
    }


    //活动取消
    @PostMapping(value = "/cancel")
    public Boolean cancel(@RequestParam Long id) {
        return null;
    }


}
